package com.example.mydefinedview1.ui

import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View

/**
 *
 * @Author： LJH
 * @Time： 2022/6/29
 * @description：
 */
class OvalView(context: Context, attr:AttributeSet?):View(context,attr) {
    private val paint = Paint()

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)
        //练习内容：使用 canvas.drawOval() 方法画椭圆
        canvas?.drawOval(300F,300F,500F,400F,paint)
    }
}